
</html><%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java1234.model.animal,java.util.ArrayList"%> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>搜索信息</title>
<style type="text/css">
	html{
	height:100%;
	background-image:url("images/uerfind.jpg");
	background-attachment:fixed;
	background-repeat:no-repeat;
	background-size:100%;
	}
	.form{
	width:300px;
	height:300px;
	margin:0 auto;
	margin-top:200px;
	}.submit{
	margin-top:30px;
	width:100px;
	}
</style>
</head>
<body>
<%String username = (String)request.getSession().getAttribute("username");
 %>
<a href="carlist.jsp">我的购物车</a><br><a href="buyfind.jsp">销售统计</a>
<%String user = (String)request.getAttribute("userName"); %><a href="usermanage.jsp?&Sno=<%=user%>">管理个人信息</a>
	<form class="form"action="userfindServlet"method="post">
		
		按I D查找<input type="text" name="ID"/><br>按名字查找<input type="text" name="animalName"/><input type="submit" value="查找">	<br>
		<table border="1">
			<tr><th>宠物ID</th><th>宠物名字</th><th>种类</th><th>价格</th><th>特点</th></tr>
			<%
			
				try{
					ArrayList<animal> animal1 =(ArrayList<animal>)request.getAttribute("aList");
					for(animal animal2:animal1)
					{
						%><tr><th><%=animal2.getId() %></th><th><%=animal2.getAnimalName() %></th><th><%=animal2.getAnimalType() %></th><th><%=animal2.getPrice() %></th><th><%=animal2.getTxt() %></th>
						<th><a href="car.jsp?&ID=<%=animal2.getId()%>&Price=<%=animal2.getPrice()%>&Username=<%=username%>">加入购物车</a></th></tr>
						
					<%
					}
				}catch(Exception e){
					
				}
			%>
				
		</table>
	</form>

</body>
</html>